package buxfer;

import org.openqa.selenium.WebDriver;
import org.testng.Assert;

import java.util.concurrent.TimeUnit;

/**
 * Created with IntelliJ IDEA.
 * User: stem
 * Date: 14.11.13
 * Time: 23:26
 * To change this template use File | Settings | File Templates.
 */
public class assertPage {
    private WebDriver driver;
    String urlTrue="home#";
    String urlFalse="slogin";
    String url="";

    public assertPage(WebDriver driver){
        this.driver=driver;

    }
    public String getUrl(){
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        url=driver.getCurrentUrl();
        return url;
    }
    public void assertLoginTrue(String url){
        Assert.assertTrue(url.contains(urlTrue));
    }
    public void assertLoginFalse(String url){
        Assert.assertTrue(url.contains(urlFalse));
    }

}
